<?php
namespace Blind\Model;
use Think\Model;

class AdvertisementModel extends Model{

	//查询所有广告
	public function getAdver()
	{
		$data = M('advertisement') -> select();
		return $data;
	}

	//编辑广告
	public function updateAdver($data)
	{
		$id = $data['id'];

		$res = M('Advertisement') ->where("id=%d",$id)-> save($data);

		return $res;
	}
}